home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 6.2 / 2000-12_-_Disc_6.2.iso / Patches / age2upa.exe / CABFILE / FILESUSA.CAB / Data / gamedata.drs / Unnamed File 000027.bina < prev    next >
Text File  |  1999-11-11  |  4KB  |  214 lines

  1. ;for war war-galleys
  2. ;goal 2 0 = no problem; 2 1 = enemy warships!; 2 2 = we've won at sea!
  3. ;have we lost the ship war? Is it time to give up on boats?
  4. ;we need transport-ships
  5. (defrule
  6.     (soldier-count >= fifteen-percent-pop)
  7.     (unit-type-count-total transport-ship < 2)
  8.     (can-train transport-ship)
  9. =>
  10.     (train transport-ship)
  11. )
  12.  
  13. (defrule
  14.     (soldier-count >= fifteen-percent-pop)
  15.     (unit-type-count-total transport-ship == 0)
  16.     (can-train-with-escrow transport-ship)
  17.     (not (can-train transport-ship) )
  18. =>
  19.     (release-escrow wood)
  20.     (train transport-ship)
  21. )
  22.  
  23. ;start the run-through for military ships
  24. (defrule
  25.     (goal make-warboat YES)
  26.     (current-age > dark-age)
  27.     (building-type-count dock > 0)
  28. =>
  29.     (set-goal make-warboat NO)
  30. )
  31.  
  32. (defrule
  33.     (current-age == feudal-age)
  34.     (or
  35.         (building-type-count-total blacksmith > 0)
  36.         (wood-amount > 300)
  37.     )
  38.     (nand
  39.         (goal upgrade-conflict NOTICE)
  40.         (gold-amount < 250)
  41.     )
  42. =>
  43.     (set-goal make-warboat YES)
  44. )
  45.  
  46. (defrule
  47.     (current-age == castle-age)
  48.     (or
  49.         (building-type-count-total castle > 0)
  50.         (or
  51.             (building-type-count-total university > 0)
  52.             (wood-amount > 300)
  53.         )
  54.     )
  55.     (nand
  56.         (goal upgrade-conflict NOTICE)
  57.         (gold-amount < 850)
  58.     )
  59. =>
  60.     (set-goal make-warboat YES)
  61. )
  62.  
  63. (defrule
  64.     (current-age == imperial-age)
  65. =>
  66.     (set-goal make-warboat YES)
  67. )
  68.  
  69. (defrule
  70.     (goal make-warboat YES)
  71.     (goal 2 2)
  72. =>
  73.     (set-goal make-warboat NO)
  74. )
  75.  
  76. ;cannon-galleons
  77. (defrule
  78.     (warboat-count > 2)
  79.     (can-train cannon-galleon-line)
  80.     (unit-type-count cannon-galleon-line < ten-percent-pop)
  81.     (difficulty <= hard)
  82.     (or
  83.         (and
  84.             (not (goal 2 2) )
  85.             (warboat-count < fifteen-percent-pop)
  86.         )
  87.         (warboat-count < ten-percent-pop)
  88.     )
  89. =>
  90.     (train cannon-galleon-line)
  91.     (set-goal make-fire-boat YES)
  92. )
  93.  
  94. (defrule
  95.     (warboat-count > 2)
  96.     (unit-type-count cannon-galleon-line < five-percent-pop)
  97.     (difficulty <= hard)
  98.     (can-train-with-escrow cannon-galleon-line)
  99.     (not (can-train cannon-galleon-line) )
  100.     (or
  101.         (and
  102.             (not (goal 2 2) )
  103.             (warboat-count < fifteen-percent-pop)
  104.         )
  105.         (warboat-count < ten-percent-pop)
  106.     )
  107. =>
  108.     (release-escrow wood)
  109.     (release-escrow gold)
  110.     (train cannon-galleon-line)
  111.     (set-goal make-fire-boat YES)
  112. )
  113.  
  114. #load-if-defined VIKING-CIV
  115.     ;longboats
  116.     (defrule
  117.         (goal make-warboat YES)
  118.         (current-age == castle-age)
  119.         (can-train longboat)
  120.     (or
  121.         (and
  122.             (not (goal 2 2) )
  123.             (warboat-count < fifteen-percent-pop)
  124.         )
  125.         (warboat-count < five-percent-pop)
  126.     )
  127.     =>
  128.         (train longboat)
  129.         (set-goal make-fire-boat YES)
  130.     )
  131. #end-if
  132.  
  133. ;demolition-ships
  134. (defrule
  135.     (warboat-count < five-percent-pop)
  136.     (unit-type-count-total demolition-ship-line == 0)
  137.     (can-train demolition-ship-line)
  138.     (not (goal 2 2) )
  139. =>
  140.     (train demolition-ship-line)
  141. )
  142.  
  143. ;fire-ships
  144. (defrule
  145.     (warboat-count < five-percent-pop)
  146.     (current-age == castle-age)
  147.     (can-train fire-ship)
  148.     (not (goal 2 2) )
  149. =>
  150.     (train fire-ship)
  151.     (set-goal make-fire-boat NO)
  152. )
  153.  
  154. (defrule
  155.     (goal make-warboat YES)
  156.     (goal make-fire-boat YES)
  157.     (current-age == castle-age)
  158.     (can-train fire-ship)
  159.     (or
  160.         (and
  161.             (not (goal 2 2) )
  162.             (warboat-count < fifteen-percent-pop)
  163.         )
  164.         (warboat-count < five-percent-pop)
  165.     )
  166. =>
  167.     (train fire-ship)
  168.     (set-goal make-fire-boat NO)
  169. )
  170.  
  171. (defrule
  172.     (goal make-warboat YES)
  173.     (goal make-fire-boat YES)
  174.     (current-age == imperial-age)
  175.     (can-train fire-ship-line)
  176.     (or
  177.         (and
  178.             (not (goal 2 2) )
  179.             (warboat-count < fifteen-percent-pop)
  180.         )
  181.         (warboat-count < five-percent-pop)
  182.     )
  183. =>
  184.     (train fire-ship-line)
  185.     (set-goal make-fire-boat NO)
  186. )
  187.  
  188. ;galleys
  189. (defrule
  190.     (warboat-count < five-percent-pop)
  191.     (can-train galley-line)
  192.     (not (unit-available longboat-line) )
  193.     (not (goal 2 2) )
  194. =>
  195.     (train galley-line)
  196.     (set-goal make-fire-boat YES)
  197. )
  198.  
  199. (defrule
  200.     (goal make-warboat YES)
  201.     (can-train galley-line)
  202.     (not (unit-available longboat-line) )
  203.     (or
  204.         (and
  205.             (not (goal 2 2) )
  206.             (warboat-count < fifteen-percent-pop)
  207.         )
  208.         (warboat-count < five-percent-pop)
  209.     )
  210. =>
  211.     (train galley-line)
  212.     (set-goal make-fire-boat YES)
  213. )
  214.